package com.suxin.utils;

import java.io.*;
import java.util.Properties;

/**
 * @author Tang
 * @classname DefaultPropertiesPersister
 * @description [  ]
 * @date 2022/12/22 20:56
 */
public class DefaultPropertiesPersister implements PropertiesPersister{

    @Override
    public void load(Properties props, InputStream is) throws IOException {
        props.load(is);
    }

    @Override
    public void load(Properties props, Reader reader) throws IOException {
        props.load(reader);
    }

    @Override
    public void store(Properties props, OutputStream os, String header) throws IOException {
        props.store(os,header);
    }

    @Override
    public void store(Properties props, Writer writer, String header) throws IOException {
        props.store(writer,header);
    }

    @Override
    public void loadFromXml(Properties props, InputStream is) throws IOException {
        props.loadFromXML(is);
    }

    @Override
    public void storeToXml(Properties props, OutputStream os, String header) throws IOException {
        props.storeToXML(os,header);
    }
}
